<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" class="app">
<head>  
  <title>会员管理－认证信息</title>
  <meta name="description" content="app, web app, responsive, admin dashboard, admin, flat, flat ui, ui kit, off screen nav" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> 
  
	<jsp:include page="../lbi/common.jsp"></jsp:include>
</head>

<body class="">
  <section class="vbox">
    
		<jsp:include page="../lbi/head.jsp" ></jsp:include>
		
    <section>
      <section class="hbox stretch">
        <!-- .aside -->
        <jsp:include page="../lbi/left.jsp" ></jsp:include>
        <!-- /.aside -->
        
        <section id="content">
                  <section class="hbox stretch">
                          <section id="content">
                         <section class="hbox stretch">
            <!--从这里开始复制粘贴-->
            <section class="vbox">
                <header class="header bg-white b-b clearfix">
                    <div class="row m-t-sm">
                        <div class="inform">
                            <span><a href="<c:url value="/web/toSecInform.do?userId=${authentication.userId }"/>">基本信息</a></span>
                            <span class="act"><a href="<c:url value="/web/toAuthenticationIndex.do?userId=${authentication.userId }"/>">认证信息</a></span>
                        </div>
                    </div>
                </header>
                <section class="scrollable wrapper w-f">
                    <section class="panel panel-default">
                        <div class="row">
                                <div class="col-xs-2 inform_left">
                                    职务
                                </div>
                                <div class="col-xs-4 inform_right2">
                                    ${authentication.post }
                                </div>
                        </div>
                        <div class="row">
                                <div class="col-xs-2 inform_left">
                                    院校／公司
                                </div>
                                <div class="col-xs-4 inform_right2">
                                    ${authentication.company }
                                </div>
                        </div>
                        <div class="row">
                                <div class="col-xs-2 inform_left">
                                    证件照
                                </div>
                                <div class="col-xs-4 image">
                                    <span class="example">
                                    <c:if test="${authentication.uploadImage != null }">
                                        <p><img src="http://qiniu.images.69mark.com/${authentication.uploadImage }" alt=""></p>
                                    </c:if>
                                    
                                    <c:if test="${authentication.uploadImage == null }">
                                        <p><img src="<c:url value="/images/mingpian.jpg"/>" alt=""></p>
                                    </c:if>
                                </span>
                                
                                </div>
                        </div>
                        <div class="row">
	                        <div class="col-xs-2 inform_left">
	                            审核：
	                        </div>
	                        <div class="col-xs-4 inform_right">
                                <c:if test="${authentication.type == 1 || authentication.type == 2 }">
                                    <p style="margin-top: 5px;"><span><input class="peo"   type="radio" name="huiyuan" value="2" checked="checked"/>&nbsp;通过</span>
	                                <span style="padding-left: 20px;"><input class="peo"  type="radio" name="huiyuan" value="3" />&nbsp;拒绝</span></p>
	                                <div id="show2" style="display: none;">
	                                    <textarea rows="3" id="describes" placeholder="填写拒绝理由">${authentication.describes }</textarea>
	                                </div>
	                            </c:if>
	                            
	                            <c:if test="${authentication.type == 3 }">
                                    <p style="margin-top: 5px;"><span><input class="peo"   type="radio" name="huiyuan" value="2" />&nbsp;通过</span>
                                    <span style="padding-left: 20px;"><input class="peo"  type="radio" name="huiyuan" value="3" checked="checked" />&nbsp;拒绝</span></p>
                                    <div id="show2">
                                        <textarea rows="3" id="describes" placeholder="填写拒绝理由">${authentication.describes }</textarea>
                                    </div>
                                </c:if>
	                            
	                        </div>
                        </div>
                    </section>
                </section>
                <footer class="footer bg-white b-t">
	                <div class="row text-center-xs">
	                    <div class="col-md-6 hidden-sm">
	                    		<a href="javascript:history.go(-1);"><button>上一步</button></a>
	                    		<a onclick="delfuncitem('${authentication.tId}','${authentication.userId }');return false;"><button>提交</button></a>
	                    </div>
	                    <div class="col-md-6 col-sm-12 text-right text-center-xs">
	                        
	                    </div>
	                </div>
	            </footer>
            </section>
            <!--以上为内容-->
            <a href="#" class="hide nav-off-screen-block" data-toggle="class:nav-off-screen" data-target="#nav"></a>
        </section>
                      </section>
    
                  </section>
             </section>
    </section>
  </section>
  </section>
  
  <script type="text/javascript">
    $('.example img').zoomify();
  
    $("#mishu").addClass("active");
    $("#mishu_list").addClass("active2");

    $("#nav_1").css('display','block');
  
    $(function(){
        $(".peo").click(function(){
            if($(this).attr("value")=="3"){
            	$("#show2").show();
            }else
                $("#show2").hide();
            });
    });
    
    var _serviceURL = '/69mark/web';
    
    function delfuncitem(thisid,userId){
    	
    	var type = $('input:radio[name="huiyuan"]:checked').val();
    	var describe = $("#describes").val();

    	layer.confirm('确定提交？',{btn:['确定','取消']},function(){
            $.ajax({
                type:'POST',
                url:_serviceURL+'/toUpdateAuthentication.do',
                data:'funcid='+thisid+"&type="+type+"&describe="+describe+"&userId="+userId,
                success:function(data){
                    if(data==1){
                        layer.msg('修改成功',{
                            time: 2000,
                        });
                        location.reload();
                    }else{
                        layer.msg(data,{
                            time: 2000,
                        });
                    }
                }
            });
        });
    }
  </script>
</body>
</html>